package utils.global.fliters;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class XssEvenValidate implements ConstraintValidator<ArrayIsEven, Object> {
    @Override
    public void initialize(ArrayIsEven constraintAnnotation) {

    }

    @Override
    public boolean isValid(Object o, ConstraintValidatorContext constraintValidatorContext) {
        return ((String[]) o).length % 2 == 0;
    }
}
